﻿using System.Threading.Tasks;
using Medical.Api.Write.Application.Command.Wms.WmsStoresCommand;
using Medical.ErrorCode;
using Medical.Api.Write.Dto.Wms;
using Medical.Api.Write.Application.Command.Wms.WmsOutCommand;
using Medical.Api.Write.Application.Command.Wms.WmsLssueCommand;

namespace Medical.Api.Write.Service.WmsService
{
    public interface IWmsService
    {
        Task<ApiResult<bool>> MaterialStoreShelveAsync(StoreShelveCommand command);
        /// <summary>
        /// 出库审批（状态0改为5）
        /// </summary>
        Task<ApiResult<bool>> AuditOutAsync(int id);
        /// <summary>
        /// 出库撤销审批（状态5改为0）
        /// </summary>
        Task<ApiResult<bool>> UndoAuditOutAsync(int id);
        /// <summary>
        /// 删除出库单，仅状态为0时允许删除
        /// </summary>
        Task<ApiResult<bool>> DeleteOutAsync(int id);
        /// <summary>
        /// 修改出库主表
        /// </summary>
        Task<ApiResult<bool>> UptOutAsync(UptOutDto dto);
        /// <summary>
        /// 新增发放主子表
        /// </summary>
        Task<ApiResult<bool>> AddLssueAsync(AddLssueDto dto);
        /// <summary>
        /// 发放主子表逻辑删除，仅状态为0时允许删除
        /// </summary>
        Task<ApiResult<bool>> DeleteLssueAsync(int id);
        /// <summary>
        /// 发放主表签收，仅状态为0时可签收，签收后状态改为5
        /// </summary>
        Task<ApiResult<bool>> SignLssueAsync(int id);
        /// <summary>
        /// 通过入库主键Id批量添加存放数据
        /// </summary>
        Task<ApiResult<bool>> BatchAddStoresFromStorageAsync(int storageId);
        /// <summary>
        /// 从存放表选择明细新增出库单
        /// </summary>
        Task<ApiResult<bool>> AddOutFromStoresAsync(AddOutFromStoresCommand command);
        /// <summary>
        /// 根据出库单主键Id新增发放单
        /// </summary>
        Task<ApiResult<bool>> AddLssueFromOutAsync(AddLssueFromOutCommand command);

    }
}
